home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / OCEMailbox.p < prev    next >
Text File  |  1996-05-01  |  55KB  |  1,540 lines

  1. {
  2.      File:        OCEMailbox.p
  3.  
  4.      Contains:    Apple Open Collaboration Environment OCEMaibox Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT OCEMailbox;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __OCEMAILBOX__}
  28. {$SETC __OCEMAILBOX__ := 1}
  29.  
  30. {$I+}
  31. {$SETC OCEMailboxIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __OCE__}
  35. {$I OCE.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __OCEMAIL__}
  38. {$I OCEMail.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __OCEMESSAGING__}
  41. {$I OCEMessaging.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __OCESTANDARDMAIL__}
  44. {$I OCEStandardMail.p}
  45. {$ENDC}
  46.  
  47. {$PUSH}
  48. {$ALIGN MAC68K}
  49. {$LibExport+}
  50.  
  51. {$IFC FOR_SYSTEM7_ONLY }
  52. {  opaque references, iterators, and progress indicator  }
  53.  
  54. TYPE
  55.     MBMailboxRef                        = Ptr;
  56.     MBOpenContainerRef                    = Ptr;
  57.     MBMailboxIterator                    = Ptr;
  58.     MBMailItemIterator                    = Ptr;
  59.     MBProgressIndicator                    = Ptr;
  60.     MBCopyOperationRef                    = Ptr;
  61.     MBNotificationRef                    = Ptr;
  62.  
  63. CONST
  64.     kMBMaxNumEnclosures            = 50;
  65.  
  66. { ******************************************************** }
  67. {  Error codes, will be moved to OCEErrors.h  }
  68. { ********************************************************* }
  69.     kOCEIncompletedCallsErr        = -15069;                        {  calls operating within that container have not yet completed  }
  70.     kOCEInvalidMBContainerTokenErr = -15070;                    {  the container token specified is invalid  }
  71.     kOCERefExhaustedErr            = -15071;                        {  all reference slots have been used  }
  72.     kOCEInvalidIteratorErr        = -15072;                        {  the Iterator specified is not valid  }
  73.     kOCEItemAlreadyLocalErr        = -15073;                        {  the letter is already local  }
  74.     kOCEIteratorOutOfRangeErr    = -15074;                        {  the iterator fell off the list of mail items  }
  75.     kOCEInvalidSortOrder        = -15075;                        {  sort order is invalid or unsupported  }
  76.     kOCEInvalidSortDirection    = -15076;                        {  sort direction is invalid or unsupported  }
  77.     kOCEInvalidMailItemFilter    = -15077;                        {  filter is invalid or unsupported  }
  78.     kOCECopyOperationCanceled    = -15078;                        {  copy operation is canceled  }
  79.     kOCECopyAlreadyCompleted    = -15079;                        {  copy operation cannot be canceled because it is already finished  }
  80.     kOCEInvalidContainerType    = -15080;                        {  the specified container type is invalid  }
  81.     kOCECannotUnmountMailboxErr    = -15081;                        {  cannot unmount the mailbox  }
  82.     kOCEInvalidLetterSpecErr    = -15082;                        {  letter spec is not valid  }
  83.     kOCECannotCloseContainerErr    = -15083;                        {  cannot close the container  }
  84.     kOCEFontNotDeclared            = -15084;                        {  cannot find font in font table  }
  85.     kOCEFontTableNotFound        = -15085;                        {  cannot find the font table in the letter  }
  86.  
  87.     kOCENoProgressIndicator        = 0;
  88.  
  89. { ******************************************************** }
  90. {  Mailbox Gestalt Values  }
  91. { ******************************************************** }
  92.     gestaltOCEMailboxAPIAttr    = 'mbxa';
  93.     gestaltMailboxAPIPresent    = $01;                            {  Mailbox API is present  }
  94.     gestaltSupportsOutbox        = $02;                            {  supports outbox access  }
  95.     gestaltSupportsErrorLog        = $04;                            {  supports mailbox error log  }
  96.  
  97. { ******************************************************** }
  98. {  Mailbox Data Structures  }
  99. { ******************************************************** }
  100.  
  101. TYPE
  102.     MBMailboxToken                        = UInt32;
  103.     MBMailboxDataPtr = ^MBMailboxData;
  104.     MBMailboxData = RECORD
  105.         mboxToken:                MBMailboxToken;
  106.         authID:                    AuthIdentity;
  107.         dataType:                OSType;
  108.         creator:                OSType;
  109.         dataClass:                OSType;
  110.         modTime:                MailTime;
  111.         name:                    RString64;
  112.     END;
  113.  
  114. {      MBPermissions control whether other applications can detect that mailbox has been mounted  }
  115.     MBPermissions                        = UInt32;
  116.  
  117. CONST
  118.     kMBPermissionsPublicMount    = $00000000;
  119.     kMBPermissionsPrivateMount    = $00000001;
  120.  
  121. { ******************************************************** }
  122. {  Container Data Structures  }
  123. { ********************************************************* }
  124. {
  125.     These structures are used to manipulate and list the mailbox containers. 
  126.     A container is a logical collection of mailbox items.  Examples of some 
  127.     standard containers are the inbox and the outbox. 
  128. }
  129.  
  130. TYPE
  131.     MBContainerType                        = UInt32;
  132.  
  133. CONST
  134.     kMBUndefinedContainerType    = $00000000;
  135.     kMBInboxContainerType        = 'inbx';
  136.     kMBOutboxContainerType        = 'otbx';
  137.  
  138.  
  139. TYPE
  140.     MBContainerTokenPtr = ^MBContainerToken;
  141.     MBContainerToken = RECORD
  142.         reserved:                ARRAY [0..2] OF UInt32;
  143.     END;
  144.  
  145.     MBContainerStatus                    = UInt32;
  146.  
  147. CONST
  148.     kMBConnectionStatusUndefined = $00000000;
  149.     kMBContainerStatusConnected    = $00000001;
  150.     kMBContainerStatusNotConnected = $00000002;
  151.  
  152.  
  153. TYPE
  154.     MBContainerFlags                    = UInt32;
  155.  
  156. CONST
  157.     kMBContainerLocal            = $00000000;
  158.     kMBContainerRemote            = $00000001;
  159.     kMBContainerLocalAndRemote    = $00000002;
  160.  
  161.  
  162. TYPE
  163.     MBContainerLocation                    = UInt32;
  164.  
  165. CONST
  166.     kMBInboxContainerCreator    = 'ptps';
  167.     kMBOutboxContainerCreator    = 'ptps';
  168.  
  169.     kMBContainerSystemClass        = 'sys ';
  170.     kMBContainerPMSAMClass        = 'pmsm';
  171.     kMBContainerUserClass        = 'user';
  172.  
  173.  
  174. TYPE
  175.     MBContainerClass                    = UInt32;
  176.     MBContainerDataPtr = ^MBContainerData;
  177.     MBContainerData = RECORD
  178.         containerToken:            MBContainerToken;
  179.         reserved:                MBContainerToken;
  180.         location:                MBContainerLocation;
  181.         status:                    MBContainerStatus;
  182.         capabilities:            ARRAY [0..2] OF MBContainerFlags;
  183.         containerType:            OSType;
  184.         creator:                OSType;
  185.         containerClass:            MBContainerClass;
  186.         name:                    RString64;
  187.     END;
  188.  
  189.     AddressAsType                        = SInt8;
  190. {
  191.      AddressAsType is actually an enumerated type and its constants
  192.     kAddressedAs_TO, kAddressedAs_CC, and kAddressedAs_BCC are
  193.     defined in OCEMail.h in an anonymous enum list. 
  194. }
  195.     MBInboxLetterDataPtr = ^MBInboxLetterData;
  196.     MBInboxLetterData = RECORD
  197.         seqNum:                    MailSeqNum;
  198.         letterFlags:            MailLetterFlags;
  199.         approximateSize:        UInt32;                                    {  approximate size of letter          }
  200.         indications:            MailIndications;
  201.         creatorType:            OCECreatorType;
  202.         sendTime:                MailTime;                                {  time that message was sent         }
  203.         family:                    OSType;
  204.         filler:                    SInt8;
  205.         addressedToMe:            SInt8;                                    {  addressed as TO, CC or BCC          }
  206.         sender:                    RString64;
  207.         subject:                RString64;                                {  subject is truncated               }
  208.     END;
  209.  
  210.     MBOutboxLetterDataPtr = ^MBOutboxLetterData;
  211.     MBOutboxLetterData = RECORD
  212.         seqNum:                    MailSeqNum;
  213.         family:                    OSType;                                    {  family this message belongs to      }
  214.         creatorType:            OCECreatorType;
  215.         messageID:                IPMMsgID;
  216.         submitTime:                MailTime;
  217.         approximateSize:        UInt32;                                    {  approximate size of letter          }
  218.         recipientCount:            UInt32;                                    {  number of recipients of message      }
  219.         pendingRecipientCount:    UInt32;                                    {  number of recipients left to send by this slot  }
  220.         state:                    PMSAMStatus;
  221.         subject:                RString64;                                {  subject is truncated              }
  222.     END;
  223.  
  224.     MBMailItemType                        = UInt32;
  225.  
  226. CONST
  227.     kMBMailItemTypeUndefined    = $00000000;
  228.     kMBInboxLetter                = $00000001;
  229.     kMBOutboxLetter                = $00000002;
  230.  
  231. {  Filters for MBGetMailItemCount  }
  232.     kMBNoFilterMask                = $00000000;
  233.     kMBInTrashFilterMask        = $00000004;
  234.  
  235.  
  236. TYPE
  237.     MBMailItemFilter                    = UInt32;
  238.     MBMailItemDataPtr = ^MBMailItemData;
  239.     MBMailItemData = RECORD
  240.         itemType:                MBMailItemType;
  241.         CASE INTEGER OF
  242.         0: (
  243.             inboxLetter:        MBInboxLetterData;
  244.             );
  245.         1: (
  246.             outboxLetter:        MBOutboxLetterData;
  247.             );
  248.     END;
  249.  
  250. {  Used to mark an item read or unread using MBMarkLetter  }
  251.     MBLetterReadStatus                    = UInt32;
  252.  
  253. CONST
  254.     kMBLeaveReadMark            = $00000000;
  255.     kMBMarkLetterRead            = $00000001;
  256.     kMBMarkLetterUnread            = $00000002;
  257.  
  258. {  Used to mark an item in or out of trash using MBMarkLetter  }
  259.  
  260. TYPE
  261.     MBLetterTrashStatus                    = UInt32;
  262.  
  263. CONST
  264.     kMBLeaveTrashMark            = $00000000;
  265.     kMBMarkLetterInTrash        = $00000001;
  266.     kMBMarkLetterNotInTrash        = $00000002;
  267.  
  268. { ******************************************************** }
  269. {  Changes Enumeration Data Structures  }
  270. { ********************************************************* }
  271.  
  272. TYPE
  273.     MBMailItemChangeType                = UInt32;
  274.  
  275. CONST
  276.     kMBNoChange                    = $00000000;
  277.     kMBNewLetter                = $00000001;
  278.     kMBDeletedLetter            = $00000002;
  279.     kMBChangedLetter            = $00000004;
  280.     kMBAllChanges                = $7FFFFFFF;
  281.  
  282.  
  283. TYPE
  284.     MBNotificationMask                    = UInt32;
  285.  
  286. CONST
  287.     kMBNoNotification            = $00000000;
  288.     kMBNotificationNewMailItem    = $00000001;
  289.     kMBNotificationDeletedMailItem = $00000002;
  290.     kMBNotificationChangedMailItem = $00000004;
  291.     kMBNotificationMBReset        = $00000008;                    {  must re-enumerate container contents  }
  292.     kMBNotificationMailboxGoingAway = $00000010;
  293.     kMBNotificationMSAMError    = $00000020;
  294.     kMBIgnoreThisNotification    = $80000000;                    {  for future extensibility  }
  295.     kMBAllNotifications            = $7FFFFFFF;
  296.  
  297. { ********************************************************* }
  298. {  For mail item iterators  }
  299. { ********************************************************* }
  300.  
  301. TYPE
  302.     MBSortOrder                            = UInt32;
  303.  
  304. CONST
  305.     kMBSortOrderMailSeqNum        = $00000001;
  306.  
  307.  
  308. TYPE
  309.     MBSortDirection                        = UInt32;
  310.  
  311. CONST
  312.     kMBAscending                = 0;
  313.  
  314. {  forward declaration  }
  315.  
  316. TYPE
  317.     MailboxParamPtr = ^MailboxParam;
  318. { ------------------------------------------------------------------------------ }
  319. {      Parameter Blocks for the Operations                                         }
  320. { ------------------------------------------------------------------------------ }
  321. { ******************************************************** }
  322. {  Mailbox Operations  }
  323. { ******************************************************** }
  324. {  Mounts the mailbox. Returns a mailboxRef which should be used on all future operations.  }
  325.     MBMountMailboxPBPtr = ^MBMountMailboxPB;
  326.     MBMountMailboxPB = RECORD
  327.         qLink:                    Ptr;
  328.         reservedH1:                SInt32;
  329.         reservedH2:                SInt32;
  330.         ioCompletion:            MSAMIOCompletionUPP;
  331.         ioResult:                OSErr;
  332.         saveA5:                    SInt32;
  333.         reqCode:                SInt16;
  334.         authID:                    AuthIdentity;                            {   --> valid user authentication  }
  335.         reserved1:                SInt32;                                    {   --> must be set to 0  }
  336.         reserved2:                UInt32;                                    {   --> must be set to 0  }
  337.         mailboxDataPtr:            MBMailboxDataPtr;                        {  <--> user supplied buffer for mailbox data  }
  338.         mailboxRef:                MBMailboxRef;                            {  <--  allows user to access contents of the mailbox  }
  339.     END;
  340.  
  341. {  Unmounts the Mailbox. After this call, the mailboxRef is no longer valid.  }
  342.     MBUnmountMailboxPBPtr = ^MBUnmountMailboxPB;
  343.     MBUnmountMailboxPB = RECORD
  344.         qLink:                    Ptr;
  345.         reservedH1:                SInt32;
  346.         reservedH2:                SInt32;
  347.         ioCompletion:            MSAMIOCompletionUPP;
  348.         ioResult:                OSErr;
  349.         saveA5:                    SInt32;
  350.         reqCode:                SInt16;
  351.         mailboxRef:                MBMailboxRef;                            {   --> ref of mailbox to unmount  }
  352.         reserved:                SInt32;                                    {   --> must be set to 0  }
  353.     END;
  354.  
  355. { ******************************************************** }
  356. {  Container and Mail Item Operations  }
  357. { ********************************************************* }
  358. {  Opens the container for use, returns a containerRef which should be used in all future Container operations  }
  359.     MBOpenContainerPBPtr = ^MBOpenContainerPB;
  360.     MBOpenContainerPB = RECORD
  361.         qLink:                    Ptr;
  362.         reservedH1:                SInt32;
  363.         reservedH2:                SInt32;
  364.         ioCompletion:            MSAMIOCompletionUPP;
  365.         ioResult:                OSErr;
  366.         saveA5:                    SInt32;
  367.         reqCode:                SInt16;
  368.         mailboxRef:                MBMailboxRef;                            {   --> authenticates client to access contents  }
  369.         containerToken:            MBContainerToken;                        {   --> containerToken, persistent accross sessions  }
  370.         containerRef:            MBOpenContainerRef;                        {  <--  specifies the mounted mailbox we are dealing with  }
  371.     END;
  372.  
  373. {  Closes the container and invalidates the containerRef  }
  374.     MBCloseContainerPBPtr = ^MBCloseContainerPB;
  375.     MBCloseContainerPB = RECORD
  376.         qLink:                    Ptr;
  377.         reservedH1:                SInt32;
  378.         reservedH2:                SInt32;
  379.         ioCompletion:            MSAMIOCompletionUPP;
  380.         ioResult:                OSErr;
  381.         saveA5:                    SInt32;
  382.         reqCode:                SInt16;
  383.         containerRef:            MBOpenContainerRef;                        {   --> ref to container you wish to close  }
  384.         forceClose:                BOOLEAN;                                {   --> true to close in spite of outstanding letters that have not been closed  }
  385.         filler:                    SInt8;
  386.     END;
  387.  
  388. {  Reconnect open container to remote service  }
  389.     MBReconnectOpenContainerPBPtr = ^MBReconnectOpenContainerPB;
  390.     MBReconnectOpenContainerPB = RECORD
  391.         qLink:                    Ptr;
  392.         reservedH1:                SInt32;
  393.         reservedH2:                SInt32;
  394.         ioCompletion:            MSAMIOCompletionUPP;
  395.         ioResult:                OSErr;
  396.         saveA5:                    SInt32;
  397.         reqCode:                SInt16;
  398.         containerRef:            MBOpenContainerRef;                        {   --> the container ref to which to reconnect  }
  399.         reserved1:                UInt32;                                    {   --> must be set to 0  }
  400.         reserved2:                UInt32;                                    {   --> must be set to 0  }
  401.     END;
  402.  
  403. {  Returns the mail item with the specified mail sequence number  }
  404.     MBGetMailItemDataPBPtr = ^MBGetMailItemDataPB;
  405.     MBGetMailItemDataPB = RECORD
  406.         qLink:                    Ptr;
  407.         reservedH1:                SInt32;
  408.         reservedH2:                SInt32;
  409.         ioCompletion:            MSAMIOCompletionUPP;
  410.         ioResult:                OSErr;
  411.         saveA5:                    SInt32;
  412.         reqCode:                SInt16;
  413.         containerRef:            MBOpenContainerRef;                        {   --> ref to container from which you wish to get data  }
  414.         seqNum:                    MailSeqNum;                                {   --> mail sequence number of the letter  }
  415.         dataPtr:                MBMailItemDataPtr;                        {  <--> user supplied buffer where to copy data  }
  416.     END;
  417.  
  418. {  Returns the number of items in the container (filtered, if specified)  }
  419.     MBGetMailItemCountPBPtr = ^MBGetMailItemCountPB;
  420.     MBGetMailItemCountPB = RECORD
  421.         qLink:                    Ptr;
  422.         reservedH1:                SInt32;
  423.         reservedH2:                SInt32;
  424.         ioCompletion:            MSAMIOCompletionUPP;
  425.         ioResult:                OSErr;
  426.         saveA5:                    SInt32;
  427.         reqCode:                SInt16;
  428.         containerRef:            MBOpenContainerRef;                        {   --> container whose items are to be counted   }
  429.         filter:                    MBMailItemFilter;                        {   --> filter to apply when counting items      }
  430.         count:                    UInt32;                                    {  <--  number of items of that type in the container  }
  431.     END;
  432.  
  433. {
  434.  Allocates the memory and sets the Iterator to the first 
  435.    of the mail items of that type in the container. 
  436. }
  437.     MBCreateMailItemIteratorPBPtr = ^MBCreateMailItemIteratorPB;
  438.     MBCreateMailItemIteratorPB = RECORD
  439.         qLink:                    Ptr;
  440.         reservedH1:                SInt32;
  441.         reservedH2:                SInt32;
  442.         ioCompletion:            MSAMIOCompletionUPP;
  443.         ioResult:                OSErr;
  444.         saveA5:                    SInt32;
  445.         reqCode:                SInt16;
  446.         containerRef:            MBOpenContainerRef;                        {   --> ref of container where iterator should be set  }
  447.         sortOrder:                MBSortOrder;                            {   --> sort order  }
  448.         sortDirection:            MBSortDirection;                        {   --> sort direction  }
  449.         reserved:                ARRAY [0..1] OF SInt32;                    {   --> must be set to 0  }
  450.         iterator:                MBMailItemIterator;                        {  <--  iterator returned here, client allocates memory     }
  451.     END;
  452.  
  453. {  Dispose of the MBMailItemIterator  }
  454.     MBDisposeMailItemIteratorPBPtr = ^MBDisposeMailItemIteratorPB;
  455.     MBDisposeMailItemIteratorPB = RECORD
  456.         qLink:                    Ptr;
  457.         reservedH1:                SInt32;
  458.         reservedH2:                SInt32;
  459.         ioCompletion:            MSAMIOCompletionUPP;
  460.         ioResult:                OSErr;
  461.         saveA5:                    SInt32;
  462.         reqCode:                SInt16;
  463.         iterator:                MBMailItemIterator;                        {   --> the iterator to dispose of     }
  464.     END;
  465.  
  466.     MBMailItemIteratePBPtr = ^MBMailItemIteratePB;
  467.     MBMailItemIteratePB = RECORD
  468.         qLink:                    Ptr;
  469.         reservedH1:                SInt32;
  470.         reservedH2:                SInt32;
  471.         ioCompletion:            MSAMIOCompletionUPP;
  472.         ioResult:                OSErr;
  473.         saveA5:                    SInt32;
  474.         reqCode:                SInt16;
  475.         iterator:                MBMailItemIterator;                        {  <--> iterator to move                          }
  476.         dataPtr:                MBMailItemDataPtr;                        {  <--> user supplied buffer where to copy data  }
  477.     END;
  478.  
  479.     MBResetMailItemIteratorPBPtr = ^MBResetMailItemIteratorPB;
  480.     MBResetMailItemIteratorPB = RECORD
  481.         qLink:                    Ptr;
  482.         reservedH1:                SInt32;
  483.         reservedH2:                SInt32;
  484.         ioCompletion:            MSAMIOCompletionUPP;
  485.         ioResult:                OSErr;
  486.         saveA5:                    SInt32;
  487.         reqCode:                SInt16;
  488.         iterator:                MBMailItemIterator;                        {  <--> mail item iterator to reset  }
  489.     END;
  490.  
  491. {  MarkLetter Read/Unread and/or In Trash/Out of Trash.  }
  492.     MBMarkLetterPBPtr = ^MBMarkLetterPB;
  493.     MBMarkLetterPB = RECORD
  494.         qLink:                    Ptr;
  495.         reservedH1:                SInt32;
  496.         reservedH2:                SInt32;
  497.         ioCompletion:            MSAMIOCompletionUPP;
  498.         ioResult:                OSErr;
  499.         saveA5:                    SInt32;
  500.         reqCode:                SInt16;
  501.         containerRef:            MBOpenContainerRef;                        {   --> container in which letter resides                       }
  502.         seqNum:                    MailSeqNum;                                {   --> mail sequence number of the letter                       }
  503.         readMark:                MBLetterReadStatus;                        {   --> must be kMBLetterRead, kMBLetterUnread or kMBLeaveReadMark  }
  504.         trashMark:                MBLetterTrashStatus;                    {   --> must be kMBLetterNotInTrash, kMBLetterInTrash or kMBLeaveTrashMark  }
  505.     END;
  506.  
  507. {  Stores the MailItem locally.  }
  508.     MBCopyLocalPBPtr = ^MBCopyLocalPB;
  509.     MBCopyLocalPB = RECORD
  510.         qLink:                    Ptr;
  511.         reservedH1:                SInt32;
  512.         reservedH2:                SInt32;
  513.         ioCompletion:            MSAMIOCompletionUPP;
  514.         ioResult:                OSErr;
  515.         saveA5:                    SInt32;
  516.         reqCode:                SInt16;
  517.         containerRef:            MBOpenContainerRef;                        {   --> container in which letter resides  }
  518.         seqNum:                    MailSeqNum;                                {   --> mail sequence number of the desired letter  }
  519.         progressIndicator:        MBProgressIndicator;                    {   --> created using MBCreateProgressIndicatoror kOCENoProgressIndicator if client does not desire progress indication.  }
  520.         copyOperationRef:        MBCopyOperationRef;                        {  <--  ref to this copy operation for use in cancel  }
  521.         newSeqNum:                MailSeqNum;                                {  <--  seqNum of new letter after successful operation  }
  522.     END;
  523.  
  524.     MBCopyToFilePBPtr = ^MBCopyToFilePB;
  525.     MBCopyToFilePB = RECORD
  526.         qLink:                    Ptr;
  527.         reservedH1:                SInt32;
  528.         reservedH2:                SInt32;
  529.         ioCompletion:            MSAMIOCompletionUPP;
  530.         ioResult:                OSErr;
  531.         saveA5:                    SInt32;
  532.         reqCode:                SInt16;
  533.         containerRef:            MBOpenContainerRef;                        {   --> container in which letter resides  }
  534.         seqNum:                    MailSeqNum;                                {   --> mail sequence number of the desired letter  }
  535.         specPtr:                FSSpecPtr;                                {   --> spec of file which will contain the local copy  }
  536.         progressIndicator:        MBProgressIndicator;                    {   --> created using MBCreateProgressIndicator or kOCENoProgressIndicator if client does not desire progress indication.  }
  537.         copyOperationRef:        MBCopyOperationRef;                        {  <--  ref to this copy operation for use in cancel  }
  538.     END;
  539.  
  540. {  Cancels the copy operation, if possible.  }
  541.     MBCancelCopyPBPtr = ^MBCancelCopyPB;
  542.     MBCancelCopyPB = RECORD
  543.         qLink:                    Ptr;
  544.         reservedH1:                SInt32;
  545.         reservedH2:                SInt32;
  546.         ioCompletion:            MSAMIOCompletionUPP;
  547.         ioResult:                OSErr;
  548.         saveA5:                    SInt32;
  549.         reqCode:                SInt16;
  550.         copyOperationRef:        MBCopyOperationRef;                        {   --> reference to copyLocal or copyToFile operation to cancel  }
  551.     END;
  552.  
  553. {  An irrevocable delete of an item from a container.  }
  554.     MBDeleteLetterPBPtr = ^MBDeleteLetterPB;
  555.     MBDeleteLetterPB = RECORD
  556.         qLink:                    Ptr;
  557.         reservedH1:                SInt32;
  558.         reservedH2:                SInt32;
  559.         ioCompletion:            MSAMIOCompletionUPP;
  560.         ioResult:                OSErr;
  561.         saveA5:                    SInt32;
  562.         reqCode:                SInt16;
  563.         containerRef:            MBOpenContainerRef;                        {   --> container in which letter resides               }
  564.         seqNum:                    MailSeqNum;                                {   --> mail sequence number of the letter to delete  }
  565.     END;
  566.  
  567. {  Forces a MailItem to be sent right now. This operation only works on MailItems in the outbox. }
  568.     MBSendNowPBPtr = ^MBSendNowPB;
  569.     MBSendNowPB = RECORD
  570.         qLink:                    Ptr;
  571.         reservedH1:                SInt32;
  572.         reservedH2:                SInt32;
  573.         ioCompletion:            MSAMIOCompletionUPP;
  574.         ioResult:                OSErr;
  575.         saveA5:                    SInt32;
  576.         reqCode:                SInt16;
  577.         containerRef:            MBOpenContainerRef;                        {   --> ref of the outbox container in which letter resides  }
  578.         seqNum:                    MailSeqNum;                                {   --> mail sequence number of the letter to send              }
  579.         timeOut:                Duration;                                {   --> time in seconds to wait for a response from server   }
  580.     END;
  581.  
  582. { ******************************************************** }
  583. {  Notification and Changes Enumeration Operations  }
  584. { ********************************************************* }
  585.     MBNotificationProcPtr = ProcPtr;  { PROCEDURE MBNotification(containerRef: MBOpenContainerRef; actualChanges: MBNotificationMask; contextPtr: UNIV Ptr; VAR item: MBMailItemData); }
  586.  
  587.     MBNotificationUPP = UniversalProcPtr;
  588. {  Allows a client to specify a callback routine and parameters.  }
  589.     MBRegisterNotificationPBPtr = ^MBRegisterNotificationPB;
  590.     MBRegisterNotificationPB = RECORD
  591.         qLink:                    Ptr;
  592.         reservedH1:                SInt32;
  593.         reservedH2:                SInt32;
  594.         ioCompletion:            MSAMIOCompletionUPP;
  595.         ioResult:                OSErr;
  596.         saveA5:                    SInt32;
  597.         reqCode:                SInt16;
  598.         containerRef:            MBOpenContainerRef;                        {   --> container for which to receive notifications  }
  599.         handler:                MBNotificationUPP;                        {   --> UPP of callback to call when changes occur       }
  600.         mask:                    MBNotificationMask;                        {   --> which events should cause a notification       }
  601.         contextPtr:                Ptr;                                    {   --> pointer to client-defined buffer is passed to handler  }
  602.         notificationRef:        MBNotificationRef;                        {  <--  reference to the newly registered notification  }
  603.         reserved:                SInt32;                                    {   --> must be set to 0  }
  604.     END;
  605.  
  606. {  Allows client to clear the callback info.  }
  607.     MBUnregisterNotificationPBPtr = ^MBUnregisterNotificationPB;
  608.     MBUnregisterNotificationPB = RECORD
  609.         qLink:                    Ptr;
  610.         reservedH1:                SInt32;
  611.         reservedH2:                SInt32;
  612.         ioCompletion:            MSAMIOCompletionUPP;
  613.         ioResult:                OSErr;
  614.         saveA5:                    SInt32;
  615.         reqCode:                SInt16;
  616.         notificationRef:        MBNotificationRef;                        {   --> reference to the notification to unregister  }
  617.     END;
  618.  
  619. { ******************************************************** }
  620. {  Progress Indication Operations  }
  621. { ********************************************************* }
  622. {
  623.  Creates a progress indicator for tracking progress of a copy operation from
  624.    MBCopyToFile or MBCopyLocal. 
  625. }
  626.     MBCreateProgressIndicatorPBPtr = ^MBCreateProgressIndicatorPB;
  627.     MBCreateProgressIndicatorPB = RECORD
  628.         qLink:                    Ptr;
  629.         reservedH1:                SInt32;
  630.         reservedH2:                SInt32;
  631.         ioCompletion:            MSAMIOCompletionUPP;
  632.         ioResult:                OSErr;
  633.         saveA5:                    SInt32;
  634.         reqCode:                SInt16;
  635.         progressIndicator:        MBProgressIndicator;                    {  <--  a progress indicator is returned here  }
  636.     END;
  637.  
  638. {  Dispose the progress indicator that was previously allocated by MBCreateProgressIndicator.  }
  639.     MBDisposeProgressIndicatorPBPtr = ^MBDisposeProgressIndicatorPB;
  640.     MBDisposeProgressIndicatorPB = RECORD
  641.         qLink:                    Ptr;
  642.         reservedH1:                SInt32;
  643.         reservedH2:                SInt32;
  644.         ioCompletion:            MSAMIOCompletionUPP;
  645.         ioResult:                OSErr;
  646.         saveA5:                    SInt32;
  647.         reqCode:                SInt16;
  648.         progressIndicator:        MBProgressIndicator;                    {   --> the progress indicator to be destroyed  }
  649.     END;
  650.  
  651. {
  652.     Returns the current level of progress that has been completed.
  653.     The following fields can be polled during the the move in order to provide a "progress" 
  654.      indicator. The operation will be done when workCompleted equals totalWorkAmount. 
  655.     totalWorkAmount is pretty much a random number and is not an indication of the amount of 
  656.     work involved. 
  657. }
  658.     MBGetCurrentProgressPBPtr = ^MBGetCurrentProgressPB;
  659.     MBGetCurrentProgressPB = RECORD
  660.         qLink:                    Ptr;
  661.         reservedH1:                SInt32;
  662.         reservedH2:                SInt32;
  663.         ioCompletion:            MSAMIOCompletionUPP;
  664.         ioResult:                OSErr;
  665.         saveA5:                    SInt32;
  666.         reqCode:                SInt16;
  667.         progressIndicator:        MBProgressIndicator;
  668.         totalWorkAmount:        UInt32;                                    {  <--  total amount of work that needs to be done, arbitrary units  }
  669.         workCompleted:            UInt32;                                    {  <--  how much work was completed, between 0 and fTotalWorkAmount  }
  670.     END;
  671.  
  672. { ******************************************************** }
  673. {  Miscellaneous Operations  }
  674. { ********************************************************* }
  675. {  Returns the LetterSpec of a letter for use with Mailer APIs.  }
  676.     MBGetLetterSpecPBPtr = ^MBGetLetterSpecPB;
  677.     MBGetLetterSpecPB = RECORD
  678.         qLink:                    Ptr;
  679.         reservedH1:                SInt32;
  680.         reservedH2:                SInt32;
  681.         ioCompletion:            MSAMIOCompletionUPP;
  682.         ioResult:                OSErr;
  683.         saveA5:                    SInt32;
  684.         reqCode:                SInt16;
  685.         containerRef:            MBOpenContainerRef;                        {   --> container within which the letter resides  }
  686.         seqNum:                    MailSeqNum;                                {   --> mail sequence number of the letter  }
  687.         specPtr:                LetterSpecPtr;                            {  <--> letter spec is returned here, client-supplied buffer  }
  688.     END;
  689.  
  690. {  Obtain a mail sequence number and open container reference from a letter spec  }
  691.     MBConvertLetterSpecPBPtr = ^MBConvertLetterSpecPB;
  692.     MBConvertLetterSpecPB = RECORD
  693.         qLink:                    Ptr;
  694.         reservedH1:                SInt32;
  695.         reservedH2:                SInt32;
  696.         ioCompletion:            MSAMIOCompletionUPP;
  697.         ioResult:                OSErr;
  698.         saveA5:                    SInt32;
  699.         reqCode:                SInt16;
  700.         specPtr:                LetterSpecPtr;                            {   --> letter spec to convert                              }
  701.         containerRef:            MBOpenContainerRef;                        {  <--  open container reference for input letter spec     }
  702.         seqNum:                    MailSeqNum;                                {  <--  mail sequence number for input letter spec         }
  703.     END;
  704.  
  705. {  Returns the containerID given a well known container type  }
  706.     MBGetContainerTokenPBPtr = ^MBGetContainerTokenPB;
  707.     MBGetContainerTokenPB = RECORD
  708.         qLink:                    Ptr;
  709.         reservedH1:                SInt32;
  710.         reservedH2:                SInt32;
  711.         ioCompletion:            MSAMIOCompletionUPP;
  712.         ioResult:                OSErr;
  713.         saveA5:                    SInt32;
  714.         reqCode:                SInt16;
  715.         mailboxRef:                MBMailboxRef;                            {   --> the ref of the desired mailbox  }
  716.         containerType:            MBContainerType;                        {   --> one of the well known container types  }
  717.         containerToken:            MBContainerToken;                        {  <--  the container Token returned here  }
  718.     END;
  719.  
  720. {  Returns ContainerData for a given ContainerToken.  }
  721.     MBGetContainerDataFromTokenPBPtr = ^MBGetContainerDataFromTokenPB;
  722.     MBGetContainerDataFromTokenPB = RECORD
  723.         qLink:                    Ptr;
  724.         reservedH1:                SInt32;
  725.         reservedH2:                SInt32;
  726.         ioCompletion:            MSAMIOCompletionUPP;
  727.         ioResult:                OSErr;
  728.         saveA5:                    SInt32;
  729.         reqCode:                SInt16;
  730.         mailboxRef:                MBMailboxRef;                            {   --> the ref of the desired mailbox  }
  731.         containerToken:            MBContainerToken;                        {   --> container you wish to get data from     }
  732.         dataPtr:                MBContainerDataPtr;                        {   --> user supplied buffer where to write the data  }
  733.     END;
  734.  
  735. { ******************************************************** }
  736. {  Contents Operations  }
  737. { ********************************************************* }
  738. {  Opens a letter that is currently in a container.  }
  739.     MBOpenLetterPBPtr = ^MBOpenLetterPB;
  740.     MBOpenLetterPB = RECORD
  741.         qLink:                    Ptr;
  742.         reservedH1:                SInt32;
  743.         reservedH2:                SInt32;
  744.         ioCompletion:            MSAMIOCompletionUPP;
  745.         ioResult:                OSErr;
  746.         saveA5:                    SInt32;
  747.         reqCode:                SInt16;
  748.         containerRef:            MBOpenContainerRef;                        {   --> open container where the letter resides      }
  749.         seqNum:                    MailSeqNum;                                {   --> mail sequence number of the desired letter      }
  750.         msgRef:                    MailMsgRef;                                {  <--  the MailMsgRef authenticates the client to view the contents  }
  751.     END;
  752.  
  753. {  Opens a letter that is currently on the disk.  }
  754.     MBOpenDiskLetterPBPtr = ^MBOpenDiskLetterPB;
  755.     MBOpenDiskLetterPB = RECORD
  756.         qLink:                    Ptr;
  757.         reservedH1:                SInt32;
  758.         reservedH2:                SInt32;
  759.         ioCompletion:            MSAMIOCompletionUPP;
  760.         ioResult:                OSErr;
  761.         saveA5:                    SInt32;
  762.         reqCode:                SInt16;
  763.         diskLetter:                FSSpec;                                    {   --> the location of the mail item on disk  }
  764.         msgRef:                    MailMsgRef;                                {  <--  the MailMsgRef authenticates the client to view the contents  }
  765.     END;
  766.  
  767. {  Closes a letter that is currently open.  }
  768.     MBCloseLetterPBPtr = ^MBCloseLetterPB;
  769.     MBCloseLetterPB = RECORD
  770.         qLink:                    Ptr;
  771.         reservedH1:                SInt32;
  772.         reservedH2:                SInt32;
  773.         ioCompletion:            MSAMIOCompletionUPP;
  774.         ioResult:                OSErr;
  775.         saveA5:                    SInt32;
  776.         reqCode:                SInt16;
  777.         msgRef:                    MailMsgRef;                                {   --> mail sequence number of the letter to close  }
  778.     END;
  779.  
  780. {  Opens a letter that is nested within another.  }
  781.     MBOpenNestedLetterPBPtr = ^MBOpenNestedLetterPB;
  782.     MBOpenNestedLetterPB = RECORD
  783.         qLink:                    Ptr;
  784.         reservedH1:                SInt32;
  785.         reservedH2:                SInt32;
  786.         ioCompletion:            MSAMIOCompletionUPP;
  787.         ioResult:                OSErr;
  788.         saveA5:                    SInt32;
  789.         reqCode:                SInt16;
  790.         msgRef:                    MailMsgRef;                                {   --> MailMsgRef of the containing letter  }
  791.         nestedMsgRef:            MailMsgRef;                                {  <--  MailMsgRef of the nested letter  }
  792.     END;
  793.  
  794. {  Returns the path where the enclosures of a certain letter are kept.  }
  795.     MBReadEnclosureFSSpecPBPtr = ^MBReadEnclosureFSSpecPB;
  796.     MBReadEnclosureFSSpecPB = RECORD
  797.         qLink:                    Ptr;
  798.         reservedH1:                SInt32;
  799.         reservedH2:                SInt32;
  800.         ioCompletion:            MSAMIOCompletionUPP;
  801.         ioResult:                OSErr;
  802.         saveA5:                    SInt32;
  803.         reqCode:                SInt16;
  804.         msgRef:                    MailMsgRef;                                {   --> message for which to read enclosure information  }
  805.         enclosureDir:            FSSpec;                                    {  <--  full path of directory where enclosures are stored  }
  806.     END;
  807.  
  808. {  Returns the path where the content of a certain letter is kept.  }
  809.     MBReadContentFSSpecPBPtr = ^MBReadContentFSSpecPB;
  810.     MBReadContentFSSpecPB = RECORD
  811.         qLink:                    Ptr;
  812.         reservedH1:                SInt32;
  813.         reservedH2:                SInt32;
  814.         ioCompletion:            MSAMIOCompletionUPP;
  815.         ioResult:                OSErr;
  816.         saveA5:                    SInt32;
  817.         reqCode:                SInt16;
  818.         msgRef:                    MailMsgRef;                                {   --> message for which to read the content  }
  819.         enclosureDir:            FSSpec;                                    {  <--  full path and file name for main enclosure  }
  820.     END;
  821.  
  822. {  Enumerates across the blocks of a letter.  }
  823.     MBEnumerateBlocksPBPtr = ^MBEnumerateBlocksPB;
  824.     MBEnumerateBlocksPB = RECORD
  825.         qLink:                    Ptr;
  826.         reservedH1:                SInt32;
  827.         reservedH2:                SInt32;
  828.         ioCompletion:            MSAMIOCompletionUPP;
  829.         ioResult:                OSErr;
  830.         saveA5:                    SInt32;
  831.         reqCode:                SInt16;
  832.         msgRef:                    MailMsgRef;                                {   --> letter whose blocks are to be enumerated  }
  833.         startIndex:                UInt16;                                    {   --> starting block index  }
  834.         buffer:                    MailBuffer;                                {  <--> user-allocated buffer where blocks are returned  }
  835.         nextIndex:                UInt16;                                    {  <--  Index of next block returned here  }
  836.         more:                    BOOLEAN;                                {  <--  true if more blocks to process  }
  837.         filler:                    SInt8;
  838.     END;
  839.  
  840. {  Returns a buffer of all the recipients of a certain letter  }
  841.     MBReadRecipientsPBPtr = ^MBReadRecipientsPB;
  842.     MBReadRecipientsPB = RECORD
  843.         qLink:                    Ptr;
  844.         reservedH1:                SInt32;
  845.         reservedH2:                SInt32;
  846.         ioCompletion:            MSAMIOCompletionUPP;
  847.         ioResult:                OSErr;
  848.         saveA5:                    SInt32;
  849.         reqCode:                SInt16;
  850.         msgRef:                    MailMsgRef;                                {   --> message about which to get recipient info  }
  851.         attrID:                    MailAttributeID;                        {   --> type of recipient, kMailFromBit through kMailBccBit  }
  852.         startIndex:                UInt16;                                    {   --> position in recipient list at which to begin, starts at 1  }
  853.         buffer:                    MailBuffer;                                {  <--> buffer contains a Mail Reply. Each tuple is an OCEPackedRecipient. Each tuple is word aligned.  }
  854.         nextIndex:                UInt16;                                    {  <--  Index of next tuple that didn't fit in buffer  }
  855.         more:                    BOOLEAN;                                {  <--  true if there are more recipient tuples to process  }
  856.         filler:                    SInt8;
  857.     END;
  858.  
  859. {  Reads the attributes of a letter as specified in the requestMask.  }
  860. {
  861.     buffer returned will contain the attribute values of 
  862.     the attributes indicated in responseMask, 
  863.     from the attribute indicated by the least significant bit set
  864.     to the attribute indicated by the most significant bit set.
  865.     Note that recipients - from, to, cc, bcc cannot be read using
  866.     this call. Use GetRecipients to read these.
  867. }
  868.     MBReadAttributesPBPtr = ^MBReadAttributesPB;
  869.     MBReadAttributesPB = RECORD
  870.         qLink:                    Ptr;
  871.         reservedH1:                SInt32;
  872.         reservedH2:                SInt32;
  873.         ioCompletion:            MSAMIOCompletionUPP;
  874.         ioResult:                OSErr;
  875.         saveA5:                    SInt32;
  876.         reqCode:                SInt16;
  877.         msgRef:                    MailMsgRef;                                {   --> letter whose attributes you wish to get  }
  878.         requestMask:            MailAttributeBitmap;                    {   --> which attributes to get, kMailIndicationsBit through kMailSubjectBit  }
  879.         buffer:                    MailBuffer;                                {  <--> attributes returned in this user supplied buffer  }
  880.         responseMask:            MailAttributeBitmap;                    {  <-- returns bits of those attributes that were returned  }
  881.         more:                    BOOLEAN;                                {  <-- true if there are more recipient tuples to process  }
  882.         filler:                    SInt8;
  883.     END;
  884.  
  885. {  Reads the block of a letter.  }
  886.     MBReadBlockPBPtr = ^MBReadBlockPB;
  887.     MBReadBlockPB = RECORD
  888.         qLink:                    Ptr;
  889.         reservedH1:                SInt32;
  890.         reservedH2:                SInt32;
  891.         ioCompletion:            MSAMIOCompletionUPP;
  892.         ioResult:                OSErr;
  893.         saveA5:                    SInt32;
  894.         reqCode:                SInt16;
  895.         msgRef:                    MailMsgRef;                                {   --> letter whose blocks you wish to read  }
  896.         blockType:                OCECreatorType;                            {   --> specifies creator and type of the block to read  }
  897.         blockIndex:                UInt16;                                    {   --> relative position of the block of that type to read  }
  898.         buffer:                    MailBuffer;                                {  <--> user suppied buffer to reciev the information  }
  899.         dataOffset:                UInt32;                                    {   --> byte offset within the block at which to start reading  }
  900.         endOfBlock:                BOOLEAN;                                {  <--  indicates whether the call has returned the entire block  }
  901.         filler:                    SInt8;
  902.         remaining:                UInt32;                                    {  <--  number of bytes of data remaining in the block  }
  903.     END;
  904.  
  905. {  Returns a SignatureContext that can be used to verify a signature.  }
  906.     MBVerifySignaturePBPtr = ^MBVerifySignaturePB;
  907.     MBVerifySignaturePB = RECORD
  908.         qLink:                    Ptr;
  909.         reservedH1:                SInt32;
  910.         reservedH2:                SInt32;
  911.         ioCompletion:            MSAMIOCompletionUPP;
  912.         ioResult:                OSErr;
  913.         saveA5:                    SInt32;
  914.         reqCode:                SInt16;
  915.         msgRef:                    MailMsgRef;                                {   --> letter containing the signature to verify  }
  916.         signatureContext:        SIGContextPtr;                            {   --> previously obtained signature context  }
  917.     END;
  918.  
  919. {  Creates a letter given the relevant info about the letter.  }
  920.     MBCreateLetterPBPtr = ^MBCreateLetterPB;
  921.     MBCreateLetterPB = RECORD
  922.         qLink:                    Ptr;
  923.         reservedH1:                SInt32;
  924.         reservedH2:                SInt32;
  925.         ioCompletion:            MSAMIOCompletionUPP;
  926.         ioResult:                OSErr;
  927.         saveA5:                    SInt32;
  928.         reqCode:                SInt16;
  929.         msgRef:                    MailMsgRef;                                {  <--  MailMsgRef of the letter just created  }
  930.         senderIdentity:            AuthIdentity;                            {   --> authenticated identity of the sender   }
  931.         msgType:                IPMMsgType;                                {   --> type, creator, and class of the sending application  }
  932.         diskForm:                BOOLEAN;                                {   --> true to create letter on disk, otherwise in the outbox  }
  933.         filler:                    SInt8;
  934.         diskLetter:                FSSpec;                                    {   --> diskForm is true, it specifies where to create the letter  }
  935.         bccRecipients:            BOOLEAN;                                {   --> set to true if creating letter with bcc recipients  }
  936.         filler2:                SInt8;
  937.     END;
  938.  
  939. {  Submits a letter for processing.  }
  940.     MBSubmitLetterPBPtr = ^MBSubmitLetterPB;
  941.     MBSubmitLetterPB = RECORD
  942.         qLink:                    Ptr;
  943.         reservedH1:                SInt32;
  944.         reservedH2:                SInt32;
  945.         ioCompletion:            MSAMIOCompletionUPP;
  946.         ioResult:                OSErr;
  947.         saveA5:                    SInt32;
  948.         reqCode:                SInt16;
  949.         msgRef:                    MailMsgRef;                                {   --> ref to the letter that you wish to submit  }
  950.         submitFlag:                BOOLEAN;                                {   --> throw letter away if submitFlag is false  }
  951.         filler:                    SInt8;
  952.         letterID:                MailLetterID;                            {  <--  persistent ID of the letter    accross the whole system  }
  953.         signaturePtr:            SIGSignaturePtr;                        {   --> pointer to digital signature  }
  954.         signatureSize:            Size;                                    {   --> size of the digital signature  }
  955.         signatureContext:        SIGContextPtr;                            {   --> pointer to the signature context  }
  956.     END;
  957.  
  958. {  Begin a nested mail item within some mail item.  }
  959.     MBBeginNestedLetterPBPtr = ^MBBeginNestedLetterPB;
  960.     MBBeginNestedLetterPB = RECORD
  961.         qLink:                    Ptr;
  962.         reservedH1:                SInt32;
  963.         reservedH2:                SInt32;
  964.         ioCompletion:            MSAMIOCompletionUPP;
  965.         ioResult:                OSErr;
  966.         saveA5:                    SInt32;
  967.         reqCode:                SInt16;
  968.         msgRef:                    MailMsgRef;                                {   --> the letter within which you wish to nest  }
  969.         reserved:                SInt32;                                    {   --> must be set to NIL  }
  970.         msgType:                IPMMsgType;                                {   --> creator and type of the nested message to create  }
  971.     END;
  972.  
  973. {  End the nested mail item. This function is always executed synchronously.  }
  974.     MBEndNestedLetterPBPtr = ^MBEndNestedLetterPB;
  975.     MBEndNestedLetterPB = RECORD
  976.         qLink:                    Ptr;
  977.         reservedH1:                SInt32;
  978.         reservedH2:                SInt32;
  979.         ioCompletion:            MSAMIOCompletionUPP;
  980.         ioResult:                OSErr;
  981.         saveA5:                    SInt32;
  982.         reqCode:                SInt16;
  983.         msgRef:                    MailMsgRef;                                {   --> the message containing the nested letter to end  }
  984.     END;
  985.  
  986. {  Add attributes to a mail item.  }
  987.     MBAddAttributePBPtr = ^MBAddAttributePB;
  988.     MBAddAttributePB = RECORD
  989.         qLink:                    Ptr;
  990.         reservedH1:                SInt32;
  991.         reservedH2:                SInt32;
  992.         ioCompletion:            MSAMIOCompletionUPP;
  993.         ioResult:                OSErr;
  994.         saveA5:                    SInt32;
  995.         reqCode:                SInt16;
  996.         msgRef:                    MailMsgRef;                                {   --> the letter to wich you wish to add an attribute  }
  997.         attrID:                    MailAttributeID;                        {   --> the type of attribute to add  }
  998.         buffer:                    MailBuffer;                                {  <--> attributes stored in buffer are copied to the mail item  }
  999.     END;
  1000.  
  1001. {  Adds an enclosure to a mail item. This function is always executed synchronously.  }
  1002.     MBAddEnclosurePBPtr = ^MBAddEnclosurePB;
  1003.     MBAddEnclosurePB = RECORD
  1004.         qLink:                    Ptr;
  1005.         reservedH1:                SInt32;
  1006.         reservedH2:                SInt32;
  1007.         ioCompletion:            MSAMIOCompletionUPP;
  1008.         ioResult:                OSErr;
  1009.         saveA5:                    SInt32;
  1010.         reqCode:                SInt16;
  1011.         msgRef:                    MailMsgRef;                                {   --> the letter to wich you wish to add an enclosure  }
  1012.         contentEnclosure:        BOOLEAN;                                {   --> whethet this enclosure contains the main content of the mail  }
  1013.         filler:                    SInt8;
  1014.         hfs:                    BOOLEAN;                                {   --> true if in the file system, false if in memory  }
  1015.         append:                    BOOLEAN;                                {   --> whether to append data in buffer to current enclosure  }
  1016.         buffer:                    MailBuffer;                                {  <--> unused if hfs is true, otherwise it contains the file's resource and data forks  }
  1017.         enclosure:                FSSpec;                                    {   --> specifies the file or folder you wish to enclose  }
  1018.         addlInfo:                MailEnclosureInfo;                        {   --> specifies file system info for the enclosure  }
  1019.     END;
  1020.  
  1021. {  Adds a block to a mail item.  }
  1022.     MBAddBlockPBPtr = ^MBAddBlockPB;
  1023.     MBAddBlockPB = RECORD
  1024.         qLink:                    Ptr;
  1025.         reservedH1:                SInt32;
  1026.         reservedH2:                SInt32;
  1027.         ioCompletion:            MSAMIOCompletionUPP;
  1028.         ioResult:                OSErr;
  1029.         saveA5:                    SInt32;
  1030.         reqCode:                SInt16;
  1031.         msgRef:                    MailMsgRef;                                {   --> the message to wich you wish to add a block  }
  1032.         refCon:                    SInt32;                                    {   --> reserved for your use  }
  1033.         blockType:                OCECreatorType;                            {   --> creator and type of the block that you want to write  }
  1034.         append:                    BOOLEAN;                                {   --> whether to append the data in you buffer to the current block  }
  1035.         filler:                    SInt8;
  1036.         buffer:                    MailBuffer;                                {  <--> stores the data you want to write to the message  }
  1037.         mode:                    MailBlockMode;                            {   --> if blockType is kMailTunnelLtrType or kMailHopInfoType mode is assumed to be kMailFromMark   }
  1038.         offset:                    UInt32;                                    {   --> offset to use to determine the starting point of the write set to 0 to start new block, ignored when append is false  }
  1039.     END;
  1040.  
  1041. {  Adds a letter to another one.  }
  1042.     MBAddLetterPBPtr = ^MBAddLetterPB;
  1043.     MBAddLetterPB = RECORD
  1044.         qLink:                    Ptr;
  1045.         reservedH1:                SInt32;
  1046.         reservedH2:                SInt32;
  1047.         ioCompletion:            MSAMIOCompletionUPP;
  1048.         ioResult:                OSErr;
  1049.         saveA5:                    SInt32;
  1050.         reqCode:                SInt16;
  1051.         newMsgRef:                MailMsgRef;                                {   --> the new letter you are composing  }
  1052.         msgRef:                    MailMsgRef;                                {   --> the original letter you want to add to the new letter  }
  1053.     END;
  1054.  
  1055. {  Adds content to a mail item.  }
  1056.     MBAddContentPBPtr = ^MBAddContentPB;
  1057.     MBAddContentPB = RECORD
  1058.         qLink:                    Ptr;
  1059.         reservedH1:                SInt32;
  1060.         reservedH2:                SInt32;
  1061.         ioCompletion:            MSAMIOCompletionUPP;
  1062.         ioResult:                OSErr;
  1063.         saveA5:                    SInt32;
  1064.         reqCode:                SInt16;
  1065.         msgRef:                    MailMsgRef;                                {   --> message from which to add some content  }
  1066.         segmentType:            MailSegmentType;                        {   --> segment type of data tou want to write  }
  1067.         append:                    BOOLEAN;                                {   --> whether to copy data from buffer into mail item  }
  1068.         filler:                    SInt8;
  1069.         buffer:                    MailBuffer;                                {  <--> place the data in this buffer  }
  1070.         textScrap:                StScrpRecPtr;                            {   --> a pointer to a style scrap structure  }
  1071.         startNewScript:            BOOLEAN;                                {   --> whether the data in buffer uses a new character set  }
  1072.         filler2:                SInt8;
  1073.         script:                    ScriptCode;                                {   --> valid only if startNewScript is true  }
  1074.     END;
  1075.  
  1076. {  Reads the content of a mail item.  }
  1077.     MBReadContentPBPtr = ^MBReadContentPB;
  1078.     MBReadContentPB = RECORD
  1079.         qLink:                    Ptr;
  1080.         reservedH1:                SInt32;
  1081.         reservedH2:                SInt32;
  1082.         ioCompletion:            MSAMIOCompletionUPP;
  1083.         ioResult:                OSErr;
  1084.         saveA5:                    SInt32;
  1085.         reqCode:                SInt16;
  1086.         msgRef:                    MailMsgRef;                                {   --> message from which to read the content  }
  1087.         segmentMask:            MailSegmentMask;                        {   --> the types of segments that you want to read  }
  1088.         buffer:                    MailBuffer;                                {  <--> user suppiled buffer into which to write the segment  }
  1089.         textScrap:                StScrpRecPtr;                            {  <--> a pointer to a style scrap structure  }
  1090.         script:                    ScriptCode;                                {  <--  the character set of the text placed in your buffer  }
  1091.         segmentType:            MailSegmentType;                        {  <--  the type of the current data segment  }
  1092.         endOfScript:            BOOLEAN;                                {  <--  whether the text in your buffer is the end of a script run  }
  1093.         endOfSegment:            BOOLEAN;                                {  <--  whether we reached the end of a segment  }
  1094.         endOfContent:            BOOLEAN;                                {  <--  whether we reached the end of the letter's content block  }
  1095.         filler:                    SInt8;
  1096.         segmentLength:            SInt32;                                    {  <--  number of bytes in the current segment  }
  1097.         segmentID:                SInt32;                                    {  <--> segment identifier  }
  1098.     END;
  1099.  
  1100. {  Adds another recipient to a mail item.  }
  1101.     MBAddRecipientPBPtr = ^MBAddRecipientPB;
  1102.     MBAddRecipientPB = RECORD
  1103.         qLink:                    Ptr;
  1104.         reservedH1:                SInt32;
  1105.         reservedH2:                SInt32;
  1106.         ioCompletion:            MSAMIOCompletionUPP;
  1107.         ioResult:                OSErr;
  1108.         saveA5:                    SInt32;
  1109.         reqCode:                SInt16;
  1110.         msgRef:                    MailMsgRef;                                {   --> message to which to add recipient information  }
  1111.         attrID:                    MailAttributeID;                        {   --> type of recipient to add to the message  }
  1112.         recipient:                MailRecipientPtr;                        {   --> where you provide complete addressing information about recipient  }
  1113.         invalid:                BOOLEAN;                                {   --> Must be set to false  }
  1114.         filler:                    SInt8;
  1115.     END;
  1116.  
  1117. {  Gets a font name from the letter, given a font number  }
  1118.     MBGetFontNameFromLetterPBPtr = ^MBGetFontNameFromLetterPB;
  1119.     MBGetFontNameFromLetterPB = RECORD
  1120.         qLink:                    Ptr;
  1121.         reservedH1:                SInt32;
  1122.         reservedH2:                SInt32;
  1123.         ioCompletion:            MSAMIOCompletionUPP;
  1124.         ioResult:                OSErr;
  1125.         saveA5:                    SInt32;
  1126.         reqCode:                SInt16;
  1127.         msgRef:                    MailMsgRef;                                {   --> letter reference from which to get font table  }
  1128.         fontNum:                SInt16;                                    {   --> font number to obtain name of  }
  1129.         filler:                    SInt16;
  1130.         fontName:                StringPtr;                                {  <--> user supplied buffer to be filled with font name  }
  1131.     END;
  1132.  
  1133.     MailboxParam = RECORD
  1134.         CASE INTEGER OF
  1135.         0: (
  1136.             qLink:                Ptr;
  1137.             reservedH1:            SInt32;
  1138.             reservedH2:            SInt32;
  1139.             ioCompletion:        MSAMIOCompletionUPP;
  1140.             ioResult:            OSErr;
  1141.             saveA5:                SInt32;
  1142.             reqCode:            SInt16;
  1143.            );
  1144.                                                                         {  Mailbox Operations  }
  1145.         1: (
  1146.             mountMailboxPB:        MBMountMailboxPB;
  1147.             );
  1148.         2: (
  1149.             unmountMailboxPB:    MBUnmountMailboxPB;
  1150.             );
  1151.                                                                         {  Container and Letter Operations  }
  1152.         3: (
  1153.             openContainerPB:    MBOpenContainerPB;
  1154.             );
  1155.         4: (
  1156.             closeContainerPB:    MBCloseContainerPB;
  1157.             );
  1158.         5: (
  1159.             reconnectOpenContainerPB: MBReconnectOpenContainerPB;
  1160.             );
  1161.         6: (
  1162.             getMailItemDataPB:    MBGetMailItemDataPB;
  1163.             );
  1164.         7: (
  1165.             getMailItemCountPB:    MBGetMailItemCountPB;
  1166.             );
  1167.         8: (
  1168.             createMailItemIteratorPB: MBCreateMailItemIteratorPB;
  1169.             );
  1170.         9: (
  1171.             disposeMailItemIteratorPB: MBDisposeMailItemIteratorPB;
  1172.             );
  1173.         10: (
  1174.             mailItemIteratePB:    MBMailItemIteratePB;
  1175.             );
  1176.         11: (
  1177.             resetMailItemIteratorPB: MBResetMailItemIteratorPB;
  1178.             );
  1179.         12: (
  1180.             markLetterPB:        MBMarkLetterPB;
  1181.             );
  1182.         13: (
  1183.             copyLocalPB:        MBCopyLocalPB;
  1184.             );
  1185.         14: (
  1186.             copyToFilePB:        MBCopyToFilePB;
  1187.             );
  1188.         15: (
  1189.             cancelCopyPB:        MBCancelCopyPB;
  1190.             );
  1191.         16: (
  1192.             deleteLetterPB:        MBDeleteLetterPB;
  1193.             );
  1194.         17: (
  1195.             sendNowPB:            MBSendNowPB;
  1196.             );
  1197.                                                                         {  Notification and Changes Iterator Operations  }
  1198.         18: (
  1199.             registerNotificationPB: MBRegisterNotificationPB;
  1200.             );
  1201.         19: (
  1202.             unregisterNotificationPB: MBUnregisterNotificationPB;
  1203.             );
  1204.                                                                         {  Progress Indicator Operations  }
  1205.         20: (
  1206.             createProgressIndicatorPB: MBCreateProgressIndicatorPB;
  1207.             );
  1208.         21: (
  1209.             disposeProgressIndicatorPB: MBDisposeProgressIndicatorPB;
  1210.             );
  1211.         22: (
  1212.             getCurrentProgressPB: MBGetCurrentProgressPB;
  1213.             );
  1214.                                                                         {  Miscellaneous Operations  }
  1215.         23: (
  1216.             getLetterSpecPB:    MBGetLetterSpecPB;
  1217.             );
  1218.         24: (
  1219.             convertLetterSpecPB: MBConvertLetterSpecPB;
  1220.             );
  1221.         25: (
  1222.             getContainerTokenPB: MBGetContainerTokenPB;
  1223.             );
  1224.         26: (
  1225.             getContainerDataFromTokenPB: MBGetContainerDataFromTokenPB;
  1226.             );
  1227.                                                                         {  Contents Operations  }
  1228.         27: (
  1229.             openLetterPB:        MBOpenLetterPB;
  1230.             );
  1231.         28: (
  1232.             openDiskLetterPB:    MBOpenDiskLetterPB;
  1233.             );
  1234.         29: (
  1235.             closeLetterPB:        MBCloseLetterPB;
  1236.             );
  1237.         30: (
  1238.             openNestedLetterPB:    MBOpenNestedLetterPB;
  1239.             );
  1240.         31: (
  1241.             readEnclosureFSSpecPB: MBReadEnclosureFSSpecPB;
  1242.             );
  1243.         32: (
  1244.             readContentFSSpecPB: MBReadContentFSSpecPB;
  1245.             );
  1246.         33: (
  1247.             enumerateBlocksPB:    MBEnumerateBlocksPB;
  1248.             );
  1249.         34: (
  1250.             readRecipientsPB:    MBReadRecipientsPB;
  1251.             );
  1252.         35: (
  1253.             readAttributesPB:    MBReadAttributesPB;
  1254.             );
  1255.         36: (
  1256.             readBlockPB:        MBReadBlockPB;
  1257.             );
  1258.         37: (
  1259.             verifySignaturePB:    MBVerifySignaturePB;
  1260.             );
  1261.         38: (
  1262.             createLetterPB:        MBCreateLetterPB;
  1263.             );
  1264.         39: (
  1265.             submitLetterPB:        MBSubmitLetterPB;
  1266.             );
  1267.         40: (
  1268.             beginNestedLetterPB: MBBeginNestedLetterPB;
  1269.             );
  1270.         41: (
  1271.             endNestedLetterPB:    MBEndNestedLetterPB;
  1272.             );
  1273.         42: (
  1274.             addAttributePB:        MBAddAttributePB;
  1275.             );
  1276.         43: (
  1277.             addEnclosurePB:        MBAddEnclosurePB;                        {  this variant is SYSTEM8_DEPRECATED }
  1278.             );
  1279.         44: (
  1280.             addBlockPB:            MBAddBlockPB;
  1281.             );
  1282.         45: (
  1283.             addLetterPB:        MBAddLetterPB;
  1284.             );
  1285.         46: (
  1286.             addContentPB:        MBAddContentPB;
  1287.             );
  1288.         47: (
  1289.             readContentPB:        MBReadContentPB;
  1290.             );
  1291.         48: (
  1292.             addRecipientPB:        MBAddRecipientPB;
  1293.             );
  1294.         49: (
  1295.             getFontNameFromLetterPB: MBGetFontNameFromLetterPB;
  1296.             );
  1297.     END;
  1298.  
  1299. { ------------------------------------------------------------------------------ }
  1300. {     FUNCTION PROTOTYPES                                                            }
  1301. { ------------------------------------------------------------------------------ }
  1302. { ******************************************************** }
  1303. {  Mailbox Operations  }
  1304. { ********************************************************* }
  1305. FUNCTION MBMountMailbox(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1306.     {$IFC NOT GENERATINGCFM}
  1307.     INLINE $3F3C, $0578, $AA5E;
  1308.     {$ENDC}
  1309. FUNCTION MBUnmountMailbox(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1310.     {$IFC NOT GENERATINGCFM}
  1311.     INLINE $3F3C, $0579, $AA5E;
  1312.     {$ENDC}
  1313. { ******************************************************** }
  1314. {  MailItem Operations  }
  1315. { ********************************************************* }
  1316. FUNCTION MBOpenContainer(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1317.     {$IFC NOT GENERATINGCFM}
  1318.     INLINE $3F3C, $0582, $AA5E;
  1319.     {$ENDC}
  1320. FUNCTION MBCloseContainer(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1321.     {$IFC NOT GENERATINGCFM}
  1322.     INLINE $3F3C, $0583, $AA5E;
  1323.     {$ENDC}
  1324. FUNCTION MBReconnectOpenContainer(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1325.     {$IFC NOT GENERATINGCFM}
  1326.     INLINE $3F3C, $057F, $AA5E;
  1327.     {$ENDC}
  1328. FUNCTION MBGetMailItemData(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1329.     {$IFC NOT GENERATINGCFM}
  1330.     INLINE $3F3C, $0592, $AA5E;
  1331.     {$ENDC}
  1332. FUNCTION MBGetMailItemCount(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1333.     {$IFC NOT GENERATINGCFM}
  1334.     INLINE $3F3C, $0584, $AA5E;
  1335.     {$ENDC}
  1336. FUNCTION MBCreateMailItemIterator(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1337.     {$IFC NOT GENERATINGCFM}
  1338.     INLINE $3F3C, $0585, $AA5E;
  1339.     {$ENDC}
  1340. FUNCTION MBDisposeMailItemIterator(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1341.     {$IFC NOT GENERATINGCFM}
  1342.     INLINE $3F3C, $0586, $AA5E;
  1343.     {$ENDC}
  1344. FUNCTION MBMailItemIterate(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1345.     {$IFC NOT GENERATINGCFM}
  1346.     INLINE $3F3C, $0587, $AA5E;
  1347.     {$ENDC}
  1348. FUNCTION MBResetMailItemIterator(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1349.     {$IFC NOT GENERATINGCFM}
  1350.     INLINE $3F3C, $0588, $AA5E;
  1351.     {$ENDC}
  1352. FUNCTION MBMarkLetter(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1353.     {$IFC NOT GENERATINGCFM}
  1354.     INLINE $3F3C, $058C, $AA5E;
  1355.     {$ENDC}
  1356. FUNCTION MBCopyLocal(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1357.     {$IFC NOT GENERATINGCFM}
  1358.     INLINE $3F3C, $058D, $AA5E;
  1359.     {$ENDC}
  1360. FUNCTION MBCopyToFile(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1361.     {$IFC NOT GENERATINGCFM}
  1362.     INLINE $3F3C, $058E, $AA5E;
  1363.     {$ENDC}
  1364. FUNCTION MBCancelCopy(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1365.     {$IFC NOT GENERATINGCFM}
  1366.     INLINE $3F3C, $058F, $AA5E;
  1367.     {$ENDC}
  1368. FUNCTION MBDeleteLetter(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1369.     {$IFC NOT GENERATINGCFM}
  1370.     INLINE $3F3C, $0590, $AA5E;
  1371.     {$ENDC}
  1372. FUNCTION MBSendNow(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1373.     {$IFC NOT GENERATINGCFM}
  1374.     INLINE $3F3C, $0591, $AA5E;
  1375.     {$ENDC}
  1376. { ******************************************************** }
  1377. {  MailItem Changes Operations  }
  1378. { ********************************************************* }
  1379. FUNCTION MBRegisterNotification(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1380.     {$IFC NOT GENERATINGCFM}
  1381.     INLINE $3F3C, $0596, $AA5E;
  1382.     {$ENDC}
  1383. FUNCTION MBUnregisterNotification(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1384.     {$IFC NOT GENERATINGCFM}
  1385.     INLINE $3F3C, $0597, $AA5E;
  1386.     {$ENDC}
  1387. { ******************************************************** }
  1388. {  Progress Indicator Operations  }
  1389. { ******************************************************** }
  1390. FUNCTION MBCreateProgressIndicator(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1391.     {$IFC NOT GENERATINGCFM}
  1392.     INLINE $3F3C, $059C, $AA5E;
  1393.     {$ENDC}
  1394. FUNCTION MBDisposeProgressIndicator(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1395.     {$IFC NOT GENERATINGCFM}
  1396.     INLINE $3F3C, $059D, $AA5E;
  1397.     {$ENDC}
  1398. FUNCTION MBGetCurrentProgress(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1399.     {$IFC NOT GENERATINGCFM}
  1400.     INLINE $3F3C, $059E, $AA5E;
  1401.     {$ENDC}
  1402. { ******************************************************** }
  1403. {  Miscellaneous Operations  }
  1404. { ********************************************************* }
  1405. FUNCTION MBGetLetterSpec(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1406.     {$IFC NOT GENERATINGCFM}
  1407.     INLINE $3F3C, $059F, $AA5E;
  1408.     {$ENDC}
  1409. FUNCTION MBConvertLetterSpec(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1410.     {$IFC NOT GENERATINGCFM}
  1411.     INLINE $3F3C, $0599, $AA5E;
  1412.     {$ENDC}
  1413. FUNCTION MBGetContainerToken(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1414.     {$IFC NOT GENERATINGCFM}
  1415.     INLINE $3F3C, $0589, $AA5E;
  1416.     {$ENDC}
  1417. FUNCTION MBGetContainerDataFromToken(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1418.     {$IFC NOT GENERATINGCFM}
  1419.     INLINE $3F3C, $058A, $AA5E;
  1420.     {$ENDC}
  1421. { ******************************************************** }
  1422. {  Contents Operations  }
  1423. { ********************************************************* }
  1424. FUNCTION MBOpenLetter(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1425.     {$IFC NOT GENERATINGCFM}
  1426.     INLINE $3F3C, $05A0, $AA5E;
  1427.     {$ENDC}
  1428. FUNCTION MBOpenDiskLetter(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1429.     {$IFC NOT GENERATINGCFM}
  1430.     INLINE $3F3C, $05A1, $AA5E;
  1431.     {$ENDC}
  1432. FUNCTION MBCloseLetter(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1433.     {$IFC NOT GENERATINGCFM}
  1434.     INLINE $3F3C, $05A2, $AA5E;
  1435.     {$ENDC}
  1436. FUNCTION MBOpenNestedLetter(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1437.     {$IFC NOT GENERATINGCFM}
  1438.     INLINE $3F3C, $05A3, $AA5E;
  1439.     {$ENDC}
  1440. FUNCTION MBReadEnclosureFSSpec(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1441.     {$IFC NOT GENERATINGCFM}
  1442.     INLINE $3F3C, $05A4, $AA5E;
  1443.     {$ENDC}
  1444. FUNCTION MBReadContentFSSpec(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1445.     {$IFC NOT GENERATINGCFM}
  1446.     INLINE $3F3C, $05A5, $AA5E;
  1447.     {$ENDC}
  1448. FUNCTION MBEnumerateBlocks(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1449.     {$IFC NOT GENERATINGCFM}
  1450.     INLINE $3F3C, $05A6, $AA5E;
  1451.     {$ENDC}
  1452. FUNCTION MBReadRecipients(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1453.     {$IFC NOT GENERATINGCFM}
  1454.     INLINE $3F3C, $05A7, $AA5E;
  1455.     {$ENDC}
  1456. FUNCTION MBReadAttributes(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1457.     {$IFC NOT GENERATINGCFM}
  1458.     INLINE $3F3C, $05A8, $AA5E;
  1459.     {$ENDC}
  1460. FUNCTION MBReadBlock(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1461.     {$IFC NOT GENERATINGCFM}
  1462.     INLINE $3F3C, $05A9, $AA5E;
  1463.     {$ENDC}
  1464. FUNCTION MBVerifySignature(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1465.     {$IFC NOT GENERATINGCFM}
  1466.     INLINE $3F3C, $05AA, $AA5E;
  1467.     {$ENDC}
  1468. FUNCTION MBCreateLetter(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1469.     {$IFC NOT GENERATINGCFM}
  1470.     INLINE $3F3C, $05AB, $AA5E;
  1471.     {$ENDC}
  1472. FUNCTION MBSubmitLetter(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1473.     {$IFC NOT GENERATINGCFM}
  1474.     INLINE $3F3C, $05AC, $AA5E;
  1475.     {$ENDC}
  1476. FUNCTION MBBeginNestedLetter(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1477.     {$IFC NOT GENERATINGCFM}
  1478.     INLINE $3F3C, $05AD, $AA5E;
  1479.     {$ENDC}
  1480. FUNCTION MBEndNestedLetter(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1481.     {$IFC NOT GENERATINGCFM}
  1482.     INLINE $3F3C, $05AE, $AA5E;
  1483.     {$ENDC}
  1484. FUNCTION MBAddAttribute(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1485.     {$IFC NOT GENERATINGCFM}
  1486.     INLINE $3F3C, $05AF, $AA5E;
  1487.     {$ENDC}
  1488. FUNCTION MBAddEnclosure(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1489.     {$IFC NOT GENERATINGCFM}
  1490.     INLINE $3F3C, $05B0, $AA5E;
  1491.     {$ENDC}
  1492. FUNCTION MBAddBlock(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1493.     {$IFC NOT GENERATINGCFM}
  1494.     INLINE $3F3C, $05B1, $AA5E;
  1495.     {$ENDC}
  1496. FUNCTION MBAddLetter(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1497.     {$IFC NOT GENERATINGCFM}
  1498.     INLINE $3F3C, $05B2, $AA5E;
  1499.     {$ENDC}
  1500. FUNCTION MBAddContent(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1501.     {$IFC NOT GENERATINGCFM}
  1502.     INLINE $3F3C, $05B3, $AA5E;
  1503.     {$ENDC}
  1504. FUNCTION MBReadContent(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1505.     {$IFC NOT GENERATINGCFM}
  1506.     INLINE $3F3C, $05B4, $AA5E;
  1507.     {$ENDC}
  1508. FUNCTION MBAddRecipient(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1509.     {$IFC NOT GENERATINGCFM}
  1510.     INLINE $3F3C, $05B5, $AA5E;
  1511.     {$ENDC}
  1512. FUNCTION MBGetFontNameFromLetter(VAR mailParam: MailboxParam; async: BOOLEAN): OSErr;
  1513.     {$IFC NOT GENERATINGCFM}
  1514.     INLINE $3F3C, $0598, $AA5E;
  1515.     {$ENDC}
  1516.  
  1517. CONST
  1518.     uppMBNotificationProcInfo = $00003FC0;
  1519.  
  1520. FUNCTION NewMBNotificationProc(userRoutine: MBNotificationProcPtr): MBNotificationUPP;
  1521.     {$IFC NOT GENERATINGCFM }
  1522.     INLINE $2E9F;
  1523.     {$ENDC}
  1524.  
  1525. PROCEDURE CallMBNotificationProc(containerRef: MBOpenContainerRef; actualChanges: MBNotificationMask; contextPtr: UNIV Ptr; VAR item: MBMailItemData; userRoutine: MBNotificationUPP);
  1526.     {$IFC NOT GENERATINGCFM}
  1527.     INLINE $205F, $4E90;
  1528.     {$ENDC}
  1529. {$ENDC}
  1530. {$ALIGN RESET}
  1531. {$POP}
  1532.  
  1533. {$SETC UsingIncludes := OCEMailboxIncludes}
  1534.  
  1535. {$ENDC} {__OCEMAILBOX__}
  1536.  
  1537. {$IFC NOT UsingIncludes}
  1538.  END.
  1539. {$ENDC}
  1540.